var mySwiper = new Swiper('.lunb1', {
	//				direction: 'vertical', // 垂直切换选项
	loop: true, // 循环模式选项
	autoplay: true,
	// 如果需要分页器
	pagination: {
		el: '.swiper-pagination',
		clickable: true, //添加原点点击事件
	},

	// 如果需要前进后退按钮
	navigation: {
		nextEl: '.swiper-button-next',
		prevEl: '.swiper-button-prev',
	},

	// 如果需要滚动条
	scrollbar: {
		el: '.swiper-scrollbar',
	},
})
let effect = 0
let  swiper = new Swiper('.lunb2', {
	loop: true,
	slidesPerView: 8,
	spaceBetween: 30,
	centeredSlides: true,
	watchSlidesProgress: true,
	on: {
		setTranslate: function() {
			slides = this.slides
			for (i = 0; i < slides.length; i++) {
				slide = slides.eq(i)
				progress = slides[i].progress
				//slide.html(progress.toFixed(2)); 看清楚progress是怎么变化的
				slide.css({
					'opacity': '',
					'background': ''
				});
				slide.transform(''); //清除样式

				if (effect == 1) {
					slide.transform('scale(' + (1 - Math.abs(progress) / 8) + ')');
				} else if (effect == 2) {
					slide.css('opacity', (1 - Math.abs(progress) / 6));
					slide.transform('translate3d(0,' + Math.abs(progress) * 20 + 'px, 0)');
				} else if (effect == 3) {
					slide.transform('rotate(' + progress * 30 + 'deg)');
				} else if (effect == 4) {
					slide.css('background', 'rgba(' + (255 - Math.abs(progress) * 20) + ',' + (127 +
						progress * 32) + ',' + Math.abs(progress) * 64 + ')');
				}

			}
		},
		setTransition: function(transition) {
			for (var i = 0; i < this.slides.length; i++) {
				var slide = this.slides.eq(i)
				slide.transition(transition);
			}
		},
	},
	navigation: {
		nextEl: '#column3-content .swiper-button-next',
		prevEl: '#column3-content .swiper-button-prev',
	},
	pagination: {
		el: '.column3-content .swiper-pagination',
		clickable: true,
	},
});

// pe = document.getElementById('progressEffect');
// pe.onchange = function() {
// 	effect = this.value
// 	swiper.update();
// }
